/* 按指定的行列打印字符 */
#include <stdio.h>

void display(int cr, int lines, int width);

int main (void)
{
  int cr;
  int rows, cols;

  printf ("enter an character and two integer:\n");
  while((cr = getchar()) != '\n')
  {
    scanf("%d%d", &rows, &cols);
    display(cr, rows, cols);
    while(getchar() != '\n');
    printf("enter an character and two integer:\n");
    printf("press enter to quit\n");
  }

  return 0;
}
void display (int cr, int lines, int width)
{
  int rows, cols;
  for(rows = 0;rows < lines;rows++)
  {
    for(cols = 0;cols < width;cols++)
      printf("%c ",cr);
    printf("\n");
  }
}
